package com.jg.visitor.common.bean;

public enum ServiceCode {
    OK(200,"接口调用成功"),
    BAD_REQUEST(400,"请求参数错误"),
    UNAUTHORIZED(401,"没有登录认证"),//未认证
    FORBIDDEN(403,"没有权限访问"),//没有权限
    NOT_FOUND(404,"未找到请求资源"),//未找到资源
    NOT_ACCEPTABLE(406,"请求头错误"),//请求头不可接受
    CONFLICT(409,"操作冲突"),//冲突
    INTERNAL_SERVER_ERROR(500,"服务器内部错误"),//服务器内部错误
    MAX_UPLOAD_SIZE(-605,"请求文件太大"),//服务器内部错误
    JSON_TO_OBJECT_ERROR(-600,"json转换错误"),
    TOKEN_ERROR(-602,"token异常"),
    GET_LOG_ADDRESS_ERROR(-603,"获取登录域名失败"),
    LOGIN_FAIL(-604,"登录失败"),
    OBJECT_TO_JSON_ERROR(-601,"对象转换错误");

    private final Integer value;
    private final String msg;

    ServiceCode(Integer value,String msg) {
        this.value = value;
        this.msg = msg;
    }

    public Integer getValue() {
        return value;
    }

    public String getMsg() {
        return msg;
    }
}
